package com.cupk.rotaryguard.monitor.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 设备诊断表
 *
 * @author tjy
 * @date 2023/4/15
 * @apiNote
 */
@TableName(value = "tb_diagnosis_info")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DeviceDiagnosis implements Serializable {
    private static final long serialVersionUID = -90356785423168322L;

    /**
     * 主键
     */
    @TableId
    private Long id;

    /**
     * 设备id
     */
    private Long deviceId;

    /**
     * 设备型号
     */
    private String deviceModel;

    /**
     * 诊断结果
     */
    private String diagnosisRes;

    /**
     * 概率分布
     */
    private String probDistribution;

    /**
     * 诊断时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime diagnosisTime;

    /**
     * 删除标志（0:代表未删除，1:已删除）
     */
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

}
